﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using V = Science.Mathematics.VectorCalculus;

namespace VectorCalculus5Ed.Chapter1.Section5
{
    public class Example08
    {
        public Example08()
		{
		}
		private string result;
		public string Result
		{
			get{return result;}
		}
		public void Compute()
		{
            V.Matrix A = new V.Matrix(4, 3);

            A[0, 0] = 4.0;
            A[0, 1] = 2.0;
            A[0, 2] = 9.0;
            A[1, 0] = 3.0;
            A[1, 1] = 5.0;
            A[1, 2] = 4.0;
            A[2, 0] = 1.0;
            A[2, 1] = 2.0;
            A[2, 2] = 3.0;
            A[3, 0] = 0.0;
            A[3, 1] = 1.0;
            A[3, 2] = 2.0;

            V.Vector e = new V.Vector(3);

            e[0] = 0.0;
            e[1] = 1.0;
            e[2] = 0.0;

            V.Vector y = A * e;

            result += y[0].ToString() + "   " + y[1].ToString() + "   " + y[2].ToString() + "   " + y[3].ToString() + "\r\n";
        }
    }
}

// 2   5   2   1
